package com.walnut.dao;

import com.walnut.model.Immortal;

import java.util.List;

/**
 * This is the delegate for accessing the datasource contains the immortal table
 * Created by parker on 15/4/5.
 */
public interface ImmortalDAO {
    /**
     * insert a new immortal entity into the datasource
     * @param immortal  the candidate
     */
    void addImmortal(Immortal immortal);

    /**
     * delete the specific immortal entity
     * @param immortalId    the unique identity of the specific immortal
     */
    void deleteImmortal(Integer immortalId);

    /**
     * retrieve the all immortals entities
     * @return
     */
    List<Immortal> getAllImmortals();

    /**
     * retrieve the detail info of the specific immortal
     * @param immortalId
     * @return
     */
    Immortal getImmortal(Integer immortalId);

    /**
     * retrieve the detail info of the specific immortal
     * @param immortalId
     * @param selected
     * @return
     */
    Immortal getImmortal(Integer immortalId, String selected);
}
